Method and apparatus for adaptive control of marginally stable systems

ABSTRACT

The present invention provides a method and apparatus for adaptive control which models marginally stable systems by creating a reference or disturbance model to account for the slope of the process variable being constant for different control inputs to the process.

FIELD OF THE INVENTION

[0001] The application relates to the field of process control engineering, and more particularly adaptive process control.

BACKGROUND OF THE INVENTION

[0002] The present applicant's previous U.S. Pat. No. 5,335,164 issued Aug. 2, 1994 and U.S. Pat. No. 5,687,077 issued Nov. 11, 1997, the contents of which are incorporated herein by reference, disclose methods and apparatus for adaptive control which use orthonormal Laguerre functions to model the process to be controlled. Such methods have proven useful for modelling and controlling inherently stable systems which eventually settle at a steady state, also referred to as self-regulating systems. However these methods are not suitable for “marginally stable” or unstable systems. A “marginally stable” system is a system which is only stable for a certain control input. An unstable system is one which cannot be made stable by any control input. An example of a marginally stable system is a leaky water tank. A control input which matches the rate of leakage results in a stable system, but an input greater or less than the rate of leakage results in either emptying or overflow of the tank. Obviously many important systems, such as those involving an energy input such as heat to a system, are marginally stable. Previous methods have difficulty modelling marginally stable systems because such systems have a process value y which goes to zero or infinity at every control input except the stable control input. For example, conventional Proportional-Integral-Derivative (PID) based loop controllers have difficulty controlling processes that involve the heating and cooling of a closed batch reactor.

[0003] There is therefore a need for a method of adaptive control which can model and control marginally stable systems.

SUMMARY OF THE INVENTION

[0004] The present invention provides a method and apparatus for adaptive control which models marginally stable systems by creating a reference or disturbance model to account for a constant slope of the process variable for different valves of the control input.

BRIEF DESCRIPTION OF THE DRAWING

[0005] In drawings illustrating a preferred embodiment of the invention:

[0006]FIG. 1 is a chart illustrating the operation of an adaptive controller according to the invention;

[0007]FIG. 2 is a flow chart illustrating the operation of an adaptive controller as applied to a batch reactor in a closed loop system according to the invention;

[0008]FIG. 3 is a simplified schematic diagram illustrating a batch reactor system; and

[0009]FIG. 4 is a chart illustrating the temperature control performance of an adaptive controller according to the invention on a batch reactor.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0010] The present invention also uses Laguerre orthonormal functions to describe process dynamics as disclosed in the applicant's previous U.S. Pat. No. 5,335,164 issued Aug. 2, 1994 and U.S. Pat. No. 5,687,077 issued Nov. 11, 1997, the contents of which are incorporated herein by reference. The Laguerre function, a complete orthonormal set in L₂, has the following Laplace domain representation: ${{L_{i}(s)} = {\sqrt{2p}\frac{\left( {s - p} \right)^{i - 1}}{\left( {s + p} \right)^{i}}}},{i = 1},\ldots \quad,N$

[0011] where

[0012] i is the number of Laguerre filters (i=1, N)

[0013] p>0 is the time scale; and

[0014] L_(i)(x) are the Laguerre polynomials.

[0015] The reason for using the Laplace domain is the simplicity of representing the Laguerre ladder network, which can be expressed as a stable, observable and controllable state space form as:

l(k+1)=Al(k)+bu(k)

y(k)=c ^(T) l(k)

[0016] where

[0017] l(k)^(T)=[l₁(k), . . . , l_(N)(k)]^(T) is the state of the ladder

[0018] C_(k) ^(T)(k)=[c₁(k), . . . , c_(N)(k)] are the Laguerre

[0019] coefficients at time k;

[0020] A is a lower triangular square (N×N) matrix.

[0021] The Laguerre coefficients represent a projection of that plant model onto a linear space whose basis is formed by an orthonormal set of Laguerre functions. This form is suitable to represent stable systems but not marginally stable systems. One approach was to factor the plant into its stable and marginally stable part, considered known. The same procedure can be applied to a plant that contains well-known unstable dynamics. The robustness of the identification method is conditioned by the exact knowledge of the marginally stable or unstable part. The same concept used in the plant identification can be used to identify the process load (output disturbance). In this case the major difference is that the controller does not have access to the disturbance model input. This issue is addressed in a stochastic manner that provides an estimate of the load. The development is based on the observation that an external white noise feeds the disturbance model, resulting in a colored signal. This signal can be estimated as the difference between plant process variable increment and the estimated plant model with the integrator removed. The present invention uses the plant and disturbance models.

[0022] The concept of predicted control involves the repeated optimization of a performance objective over a finite horizon extending from a future time (N₁) up to a prediction horizon (N₂). FIG. 1 characterizes the way prediction is used within the present control strategy. Given a set point s(k+l), a reference r(k+l) is produced by pre-filtering and is used within the optimization of the control cost function. Manipulating the control variable u(k+l) over the control horizon (N_(u)), the algorithm drives the predicted output y(k+l) over the prediction horizon towards the reference.

[0023] A simplified algorithm to implement the invention is as follows. The minimum variance control is characterized by the fact that the N₂ steps ahead output prediction (y(k+N₂) is assumed to have reached the reference trajectory value y_(r)(k+N₂). In other words

y _(r)(k+N ₂)=y(k)+y _(d)(k+N ₁)+y _(ff)(k+N ₂)+C _(k) ^(T)(l(k+N ₂)−l(k))

[0024] Making an essential assumption that the future command stays unchanged: u(k+1)= . . . =u(k+N₂), then the N₂ steps ahead predictor becomes:

y(k+N ₂)=y(k)+ k ^(T) l(k)+k _(d) ^(T)l_(d) (k)+ k _(ff) l _(ff) (k)+β _(d)μ_(d) (k)+β _(ff) 82 _(ff) (k)+βμ(k) kfflftk) +fdlld k) +J3iff U ff (k) +

[0025] where

[0026] k^(T)=C_(k)(A^(N) ^(²⁻) I)

[0027] k_(d) ^(T)=C_(d)(A_(d) ^(N) ^(²⁻) I)

[0028] k_(ff) ^(T)=C_(ff)(A_(ff) ^(N) ^(²⁻) I)

[0029] β=C_(k) ^(T)(A^(N) ^(₂) +Λ+I)b

[0030] β_(d)=C_(d) ^(T)(A_(d) ^(N) ^(₂) +Λ+I)b_(d)

[0031] β_(ff)=C_(ff) ^(T)(A_(ff) ^(N) ^(₂) +Λ+I)b_(ff)

[0032] Here u(k) is unknown, u_(d)(k) (the estimated disturbance model input) is estimated and u_(ff)(k) (measured disturbance model input) is measured, β_(*) is the sum of the first N₂ parameters of each corresponding system (i.e. plant, stochastic disturbance and deterministic disturbance, respectively).

[0033] It is obvious from the above definitions that if a designer is not looking beyond the dead time of the system, β _(*) is zero. One must choose N₂ such that β is of the same sign as the process static gain and of sufficiently large amplitude. A possible criterion to be satisfied when choosing the horizon N₂ is:

βsign(C _(k) ^(T)(I−A)⁻¹ b )≧ε|C _(K) ^(T)(I−A)⁻¹ b|

[0034] with ε=0.5. In the simple case of a minimum variance controller the matrix (I−A)⁻¹b can be computed off-line as it depends only on the Laguerre filters. Additional computation has to be carried out on-line since the identified models (i.e. their Laguerre coefficients: C_(k), C_(ff), and C_(d)) are changing. As shown in FIG. 1, a first order reference trajectory filter can be employed to define the N₂ steps ahead set point for the predictive controller (y_(r)(k+N₂)):

y _(r)(k+N ₂=∝^(N) ^(₂) y(k)+(1−∝^(N) ^(₂) y _(sp))

[0035] The required control input u(k) is therefore expressed as:

u(k)=β ⁻¹(y _(r) (k+N ₂)−(y(k)+ k ^(T) l(k)+ k _(d) ^(T) l _(d) (k)+K _(ff) l _(ff) (k)+β _(d)μ_(d) (k)+β _(ff)μ_(ff) (k)))

[0036] A) The Preferred Integrating Control Algorithm

[0037] The preferred algorithm for the invention is as follows (where “BWC” refers to the controller of the invention, and a subscripted variable A_(B) is written A_B).

[0038] The TIME for Control Action in the case of the BWC integrating version:

[0039] 1. Read the process input (CV_PROCESS(k)), process output (PV_PROCESS(k)), process measured disturbance (FFX_PROCESS(k)) and the set-point SET_POINT(k). Here X stands for various disturbances (1-3) and k for the sample time.

[0040] 2. Scaling of the process input (CV_PROCESS(k)), process output (PV_PROCESS(k)), process measured disturbance (FFX_PROCESS(k)) to internal variables corresponding for process input (CV(k)), process output (PV(k)) and process measured disturbances (FFX(k)), respectively. This procedure is necessary to bring the controlled process into a range of control movements and internal gains that will maximize the accuracy of the identification algorithm and the precision of the control method. The chosen scaling is described in the following sub-procedure. BWC_INTERNAL_GAIN = 0.06 Read the LEARNING_RATE Read the PLANT_GAIN DECISION_VARIABLE = PLANT_GAIN/BWC_INTERNAL_GAIN If DECISION_VARIABLE > 1 then CV_NORMALIZATION = PLANT_GAIN/BWC_INTERNAL_GAIN PV_NORMALIZATION = 1 Else PV_NORMALIZATION = PLANT_GAIN/BWC_INTERNAL_GAIN CV_NORMALIZATION = 1 Read CV_RANGE_MAX_RAW, CV_RANGE_MIN_RAW CV(k) = LEARNING_RATE*CV_NORMAL- IZATION*(CV_PROCESS(k)- CV_RANGE_MIN_RAW)/(CV_RANGE_MAX_RAW- CV_RANGE_MIN_RAW) PV(k) = LEARNING_RATE*PV_NORMALIZATION* (PV_PROCESS(k)-PV_RANGE_MIN_RAW)/ (PV_RANGE_MAX_RAW-PV_RANGE_MIN_RAW) FFX(k) = LEARNING_RATE*FFX_NORMALIZATION* (FFX_PROCESS(k)-FFX_RANGE_MIN_RAW)/ (FFX_RANGE_MAX_RAW-FFX_RANGE_MIN_RAW) Procedure return

[0041] 3. When the controller is just enabled or reset flag is raised then:

[0042] A: Read the following tuning parameters from the configuration file: MIN_BETA 0.001 Minimum Beta - Used for model reloading SP_FILTER 100 SP Filtering in (Range 0-100, 100-No filtering) INT_GAIN 0.2 Sum Cancel parameter gain RLS_LAMBDA 0.99 RlsLambda - Recursive Least Square Parameter RLS_ALPHA 0.5 RlsAlpha - Recursive Least Square Parameter RLS_BETA 0.005 RlsBeta - Recursive Least Square Parameter RLS_DELTA 0.005 RlsDelta - Recursive Least Square Parameter PK_DIAG 10 Initial PK covariance matrix, with a diagonal structure INTEG_LEARN_FACTOR 1 Integrating Learning Factor (1-20) SLOPE_LIMIT 0.05 Steady State Slope Limit SUM_CANCEL_COUNTER 30 Number of updates after the set-point change has occurred DIST_FILTER_LENGTH 50 Number of samples used within the filter

[0043] B. Compute the state space form of the orthonormal Laguerre network: A, B, C(k), A_FFX, B_FFX, C_FFX(k), A_STS, B_STS, C_STS(k) (see U.S. Pat. No. 5,685,077 from Nov. 11, 1997).

[0044] C(k), C_FFX(k), C_STS(k) is calculated as follows:

[0045] loaded from previously saved model; or

[0046] loaded from initial model;

[0047] initialized to [0,0,0, . . . 0]

[0048] C. Compute the control related matrices SB, SA, SS, K, SB_FFX, SA_FFX, SS_FFX, K_FFX, SB_STS, SA_STS, SS_STS, K_STS (see U.S. Pat. No. 5,685,077).

[0049] D. Initialize C_M(k) with C(k), C_M_STS(k) with C_STS(k) and C_M_FFX(k) with C_FFX(k).

[0050] E. Clear the state vector L(k), L_FFX(k), L_STS(k) used during control.

[0051] F. Update the models states as follows: $\begin{matrix} {{L(k)} = {{A*{L\left( {k - 1} \right)}} + {{B(k)}*{{CV}\left( {k - 1} \right)}}}} \\ {{{L\_ FFX}(k)} = {{{A\_ FFX}*{L\_ FFX}\left( {k - 1} \right)} + {{B\_ FFX}*{{FFX}\left( {k - 1} \right)}}}} \\ {{{L\_ STS}(k)} = {{{A\_ STS}*{L\_ STS}\left( {k - 1} \right)} + {{B\_ STS}*{{DV}\left( {k - 1} \right)}}}} \end{matrix}$

[0052] A, A_FFX, A_STS represent the state and B, B_FFX, B_STS the input matrices of the corresponding state space representation of the Laguerre networks generated for the same pole but different number of filters if required.

[0053] G. The model output estimations are calculated: $\begin{matrix} {{{Y\_ EST}(k)} = {{{Y\_ EST}\left( {k - 1} \right)} + {{C(k)}*{L(k)}}}} \\ {{{Y\_ EST}{\_ FFX}(k)} = {{{Y\_ EST}{\_ FFX}\left( {k - 1} \right)} + {{C\_ FFX}(k)*{L\_ FFX}(k)}}} \\ {{{Y\_ EST}{\_ STS}(k)} = {{{Y\_ EST}{\_ STS}\left( {k - 1} \right)} + {{C\_ STS}(k)*{L\_ STS}(k)}}} \end{matrix}$

[0054] H. The input of the unknown disturbance model is updated:

DV(k)=(Y _(—) EST(k)+Y _(—) EST _(—) FFX(k)+Y _(—) EST _(—) STS(k))−PV(k)

[0055] I. Steps F. to H. are iterated for a number of times (i.e. preferably at least 140) for the convergence of the state estimators. The computation of the input to the unknown disturbance model is also iterated for convergence purposes.

[0056] J. Computation of the prediction parameter gain

BETA(k)=C(k)*SB(k)

[0057] K. If BETA(k)<MIN_BETA then the controller stops its activity.

[0058] L. Procedure return

[0059] 4. During normal controller operation the following computations are mandatory in order to produce CV(k)

[0060] A. Update the models states as follows: $\begin{matrix} {{L(k)} = {{A*{L\left( {k - 1} \right)}} + {B*{{CV}\left( {k - 1} \right)}}}} \\ {{{L\_ FFX}(k)} = {{{A\_ FFX}*{L\_ FFX}\left( {k - 1} \right)} + {{B\_ FFX}*{{FFX}\left( {k - 1} \right)}}}} \\ {{{L\_ STS}(k)} = {{{A\_ STS}*{L\_ STS}\left( {k - 1} \right)} + {{B\_ STS}*{{DV}\left( {k - 1} \right)}}}} \end{matrix}$

[0061] A, A_FFX, A_STS, represent the state and B, B_FFX, B_STS the input matrices of the corresponding state space representation of the Laguerre networks generated for the same pole but different number of filters if required.

[0062] B. The model output estimations are re-calculated: $\begin{matrix} {{{Y\_ EST}(k)} = {{{Y\_ EST}\left( {k - 1} \right)} + {{C(k)}*{L(k)}}}} \\ {{{Y\_ EST}{\_ FFX}(k)} = {{{Y\_ EST}{\_ FFX}\left( {k - 1} \right)} + {{C\_ FFX}(k)*{L\_ FFX}(k)}}} \\ {{{Y\_ EST}{\_ STS}(k)} = {{{Y\_ EST}{\_ STS}\left( {k - 1} \right)} + {{C\_ STS}(k)*{L\_ STS}(k)}}} \end{matrix}$

[0063] C. The input of the unknown disturbance model is updated based on the following formula:

DV(k)=(Y _(—) EST(k)+Y _(—) EST _(—) FFX(k)+Y _(—) EST _(—) STS(k))−PV(k)

[0064] D. BETA(k)=C(k)*SB(k)

[0065] E. The set-point is filtered into a reference using the following digital filter:

Y _(—) R(k)=(1−0.01*SP _(—) FILTER)*Y _(—) R(k−1)+0.01*SP _(—) FILTER*SET _(—) POINT(k)

[0066] F. Now all the ingredients for the CV(k) calculation are available: $\begin{matrix} {{{CV}(k)} = \quad {{{BETA}(k)}^{- 1}*\left( {{{Y\_ R}(k)} - {{PV}(k)} - \left( {{C(k)} + {{SA}*{L(k)}}} \right) -} \right.}} \\ {\quad {\left( {{{C\_ STS}(k)*{SS}*{{DV}(k)}} + {{C\_ STS}(k)*{SA\_ STS}*{L\_ STS}(k)}} \right) -}} \\ {\quad \left( {{{C\_ FFX}(k)*{SS}*{{DV}(k)}} + {{C\_ FFX}(k)*{SA\_ FFX}*{L\_ FFX}(k)}} \right)} \end{matrix}$

[0067] G. INT_SUM(k)=INT_SUM(k−1)+DIST_FILTER_PAR*INT_GAIN*(Y_R(k)−PV(k))

[0068] The use of this integrator is required since based on the internal model principle, the plant model has to be augmented with the dynamics of the disturbance or reference signal (in this case a ramp) such as to ensure a robust, zero error, tracking of a given reference.

[0069] A conventional predictive controller that will omit this augmentation will exhibit small errors. It is important to weight the influence of this integrator in the final CV(k) since a different behavior of the controller is expected in the case of set-point changes than disturbance rejection.

DIST _(—) FILTER _(—) PAR=(DIST _(—) FILTER _(—) LENGTH−SUM _(—) CANCEL _(—) COUNTER)/DIST _(—) FILTER _(—) LENGTH ⁵

[0070] The integrator is actually an integrator plus a “nonlinear lag”, the DIST_FILTER_PAR being the time constant of this filter. The variable DIST_FILTER_LENGTH represents the non-linearity introduced such as to account for a specific number of updates following the set-point change.

[0071] H. CV(k)=CV(k)+INT_SUM(k)

[0072] 5. The scaling of controller internal variable CV(k) into controller output CV_PROCESS(k) involves a reverse computation based on the same scaling factors as in the step No. 2: $\begin{matrix} {{{CV\_ PROCESS}(k)} = \quad \left( {{{{CV}(k)}/{LEARNING\_ RATE}}/} \right.} \\ {\quad \left. {CV\_ NORMALIZATION} \right)}^{*} \\ {\quad {{{CV\_ RANGE}{\_ MAX}{\_ RAW}} -}} \\ {\left. \quad {{CV\_ RANGE}{\_ MIN}{\_ RAW}} \right) +} \\ {\quad {{CV\_ RANGE}{\_ MIN}{\_ RAW}}} \end{matrix}$

[0073] B) Modeling of Integrating Processes

[0074] The controller of the invention checks the following conditions in order to perform the identification of the process model:

[0075] 1) the modeling flag is enabled

[0076] 2) the PV(k), FFX(k) are within the learning ranges specified in the data conditioner and the algorithm has detected a SET_POINT(k) change in “auto mode” or CV(k) change in “manual mode” greater than a given SET_POINT THRESHOLD and CV_THRESHOLD, respectively.

[0077] The following steps are required to produce an accurate plant model based on Laguerre orthonormal basis functions identification:

[0078] Checking for the pair of inputs for the plant model and known disturbance models as well as the output that characterizes the plant equilibrium around a given set-point.

[0079] A least squares algorithm based on past and current data PV(k−15),PV(k−14), . . . ,PV(k) is employed to estimate the slope (SLOPE(k)) of the process variable.

[0080] Based on this estimate while SLOPE(k) it is greater than SLOPE_LIMIT then the controller will postpone the plant identification until this condition is met.

[0081] If SLOPE (K) is less than SLOPE_LIMIT the plant is assumed to be in equilibrium. CV_SS, FFX_SS are then considered as the equilibrium inputs to the plant and known disturbance models, respectively, at the moment when learning was started.

[0082] The update of the state estimate for the plant and known disturbance models, respectively, is: $\begin{matrix} {{{L\_ M}(k)} = \quad {{A*{L\_ M}\left( {k - 1} \right)} + {B*\left( {{{CV}\left( {k - 1} \right)} - {CV\_ SS}} \right)}}} \\ {{{L\_ M}{\_ FFX}(k)} = \quad {{{A\_ FFX}*{L\_ M}{\_ FFX}\left( {k - 1} \right)} +}} \\ {\quad {{B\_ FFX}*\left( {{{FFX}\left( {k - 1} \right)} - {FFX\_ SS}} \right)}} \end{matrix}$

[0083] Note as well that the variables written in (k−1) are determined at the previous sample time. For instance CV(k−1) was previously determined and since the new CV(k) is not yet available the value used in computation of the state update is CV(k−1).

[0084] The MODEL_ERROR calculation: $\begin{matrix} {{{PREDICTED\_ DELTA}{\_ PV}(k)} = \quad {{{C\_ M}\left( {k - 1} \right)*{L\_ M}(k)} +}} \\ {\quad {{C\_ M}{\_ FFX}\left( {k - 1} \right)*}} \\ {\quad {{{L\_ M}{\_ FFX}(k)} + {{C\_ M}{\_ STS}\left( {k - 1} \right)*}}} \\ {\quad {{L\_ M}{\_ STS}(k)}} \\ {{{ACTUAL\_ DELTA}{\_ PV}(k)} = \quad {{{PV}(k)} - {{PV}\left( {k - 1} \right)}}} \\ {{{MODEL\_ ERROR}(k)} = \quad {{{ACTUAL\_ DELTA}{\_ PV}(k)} -}} \\ {\quad {{PREDICTED\_ DELTA}{\_ PV}(k)}} \end{matrix}$

[0085] The covariance matrix update P(k) and P_FFX(k) for the plant and known disturbance models, respectively: $\begin{matrix} {{P(k)} = \quad {{{P\left( {k - 1} \right)}/{RLS\_ LAMBDA}} - \left( {{RLS\_ ALPHA}*{P\left( {k - 1} \right)}*} \right.}} \\ {\left. {{\quad \left. {{L\_ M}(k)} \right)}*{L\_ M}(k)^{T}*{P\left( {k - 1} \right)}} \right)/\left( {{RLS\_ LAMBDA}*} \right.} \\ {{\quad \left. \left( {{RLS\_ LAMBDA} + {{L\_ M}(k)^{T}*{P\left( {k - 1} \right)}*{L\_ M}(k)}} \right) \right)} +} \\ {\quad {{{RLS\_ BETA}*I} + {{RLS\_ DELTA}*{P\left( {k - 1} \right)}*{P\left( {k - 1} \right)}}}} \\ {{{P\_ FFX}(k)} = \quad {{{P\_ FFX}{\left( {k - 1} \right)/{RLS\_ LAMBDA}}} - \left( {{RLS\_ ALPHA}*} \right.}} \\ {{\quad \left. {{P\_ FFX}\left( {k - 1} \right)*{L\_ M}{\_ FFX}(k)} \right)}*{L\_ M}{\_ FFX}(k)^{T}*} \\ {{\quad \left. {{P\_ FFX}\left( {k - 1} \right)} \right)}/\left( {{RLS\_ LAMBDA}*\left( {{RLS\_ LAMBDA} +} \right.} \right.} \\ {{\quad \left. {{L\_ M}{\_ FFX}(k)^{T}*{P\_ FFX}\left( {k - 1} \right)*{L\_ M}{\_ FFX}(k)} \right)} +} \\ {\quad {{{RLS\_ BETA}*I} + {{RLS\_ DELTA}*{P\_ FFX}\left( {k - 1} \right)*}}} \\ {\quad {{P\_ FFX}\left( {k - 1} \right)}} \end{matrix}$

$\begin{matrix} {{{C\_ M}(k)} = \quad {{{C\_ M}(k)} + \left( {{RLS\_ ALPHA}*{P(k)}*{L\_ M}(k)/} \right.}} \\ {\quad {\left( {{RLS\_ LAMBDA} + {{\_ M}(k)^{T}*{P(k)}*{L\_ M}(k)}} \right)*}} \\ {\quad {MODEL\_ ERROR}} \\ {{{C\_ M}{\_ FFX}(k)} = \quad {{{C\_ M}{\_ FFX}(k)} + \left( {{RLS\_ ALPHA}*{P\_ FFX}(k)*} \right.}} \\ {\quad {{L\_ M}{\_ FFX}{(k)/\left( {{RLS\_ LAMBDA} + {{L\_ M}{\_ FFX}(k)^{T}*}} \right.}}} \\ {{\quad \left. {{P\_ FFX}(k)*{L\_ M}{\_ FFX}(k)} \right)}*{MODEL\_ ERROR}} \end{matrix}$

[0086] Note: When CV(k) is constant and equal to CV_SS that will generate no update for the state L_M(k) which at its own turn will generate no update for C_M(k), similar situation is encountered when FFX(k) is constant and equal to FFX_SS (i.e. L_M_FFX(k) and C_M_FFX(k) will be unmodified).

EXAMPLE

[0087] The invention was tested on a chemical batch reactor used to produce various polyester compounds. The process involves combining the reagents and then applying heat to the mixture in order to control the reactions and the resulting products. A specific temperature profile sequence for the batch reaction must be followed to ensure that the exothermic reactions occur in a controlled fashion, to avoid explosion and ensure that the resulting products have consistent properties. Also, the reaction rates must be controlled to limit the production of waste gases.

[0088]FIGS. 2 and 3 illustrate a simplified schematic of the system. The reactor operates in a temperature range between 70 and 220 degrees C. and is heated by circulating a fluid (DowTherm-G) through coils on the outside of the reactor. This fluid is in turn heated by a natural gas burner to a temperature in the range of 500 degrees C. The reactor temperature control loop monitors temperature inside the reactor and manipulates the flow of the heating fluid to the reactor jacket. Increasing the flow increases heat transfer to the reactor. Cooling can be done by closing the valves on the heat circuit and recirculating the heating fluid through a second heat exchanger. Cooling is generally only done when the batch is complete to facilitate handling. The reactor temperature is stable only if the heat input to the reactor equals the heat losses. If the flow of heating fluid is set slightly higher than the equilibrium point, the reactor temperature will rise at a constant rate until temperature limits are exceeded. The equilibrium point changes during the batch due to heat produced by the exothermic reactions and the production of vapours, which reduces the reactor temperature. Little heat input is required during the final phase of the batch when vapour production falls to zero.

[0089] The plant attempted to automate control of the reactor temperature using a PID controller, but the reactor temperature is difficult to control because of the long dead time (about 8 minutes) and long time constant (about 18 minutes) associated with heating the reactor from the outside. Also the system behaves as an integrator due to the accumulation of heat in the reactor and is therefore only marginally stable in open loop. PID controllers are not well suited for systems with these response characteristics.

[0090] A controller according to the invention was implemented on the reactor temperature control loop. The controller parameters were estimated from the observed system response from a previous batch and an appropriate model of the system was developed in the controller using an open loop system representation based on a Laguerre series representation. The control performance was found to be good. A chart of the temperature control performance of the invention during an entire batch is shown in FIG. 4. The integrating type response of the reactor is apparent from the control actions made by the controller as the reactor temperature follows the set point to higher temperature operating points with a final control output at 0%. [The batch sequence was suspended and the controller was placed in manual mode for a short time due to a water supply problem at the plant at 12:30:00. The batch sequence was later resumed and the controller was placed in automatic for the rest of the batch at 14:30:00.]

[0091] The controller in this example was implemented in C++ and run on the WINDOWS-NT™ operating system. An OLE for process control (called OPC server) was used to communicate to the Distributed Control System (DCS). Logic was programmed in the DCS device to allow operation from the existing operator console. The operator could select between manual, PID (DCS) or advanced control modes.

[0092] As will be apparent to those skilled in the art in the light of the foregoing disclosure, many alterations and modifications are possible in the practice of this invention without departing from the spirit or scope thereof. Accordingly, the scope of the invention is to be construed in accordance with the substance defined by the following claims. 

What is claimed is:
 1. A method of controlling a marginally stable industrial process using a dynamic response model comprising the step of compensating said dynamic response model by an estimate of an unmeasured disturbance.
 2. The method of claim 1 wherein said model is fixed.
 3. The method of claim 1 wherein said model is unchanging.
 4. The method of claim 1 wherein said dynamic response model is compensated by creating a disturbance model adapted to account for the slope of the process variable being zero despite changing steady state loads on the system.
 5. The method of claim 1 wherein said unmeasured disturbance is estimated as the difference between what the output of said industrial process predicted by said dynamic response model predicts and what the actually measured output of said industrial process.
 6. The method of claim 1 wherein the estimate of the unmeasured disturbance is generated by a disturbance model.
 7. The method of claim 1 wherein the effect of said unmeasured disturbance on the process is represented by a model having a slope equal in magnitude to but the negative of the dynamic response model.
 8. The method of claim 7 wherein the effect of said unmeasured disturbance on the process is represented by a model having the same time constants as the dynamic response model.
 9. The method of claim 7 wherein the effect of said unmeasured disturbance on the process is represented by a disturbance model having an equal but opposite response to the process response.
 10. A method of controlling a marginally stable, integrating industrial process comprising the step of: creating a disturbance model to account for the slope of the process variable being constant for different control inputs to the process.
 11. In a method of controlling a marginally stable industrial process comprising the steps of 1) setting an initial state vector; 2) setting an initial parameter vector; 3) setting an initial prediction parameter gain; 4) set the initial covariance matrix; 5) performing a state update 6) estimating the model error; 7) updating the parameter vector, 8) updating the co-variance matrix, and 9) updating the controller output, the improvement comprising of: creating a second reference or disturbance model to permit the model to handle integrating type processes and/or disturbances.
 12. In a method of controlling a marginally stable industrial process comprising the steps of 1) setting an initial state vector; 2) setting an initial parameter vector; 3) setting an initial prediction parameter gain; 4) set the initial covariance matrix; 5) performing a state update 6) estimating the model error; 7) updating the parameter vector, 8) updating the co-variance matrix, and 9) updating the controller output, the improvement comprising of: creating a second reference or disturbance model to permit the model to predict a stable process despite different control inputs.
 13. In a method of controlling a marginally stable industrial process comprising the steps of 1) setting an initial state vector; 2) setting an initial parameter vector; 3) setting an initial prediction parameter gain; 4) set the initial covariance matrix; 5) performing a state update 6) estimating the model error; 7) updating the parameter vector, 8) updating the co-variance matrix, and 9) updating the controller output, the improvement comprising the steps of: a) Reading the process input, process output, process measured disturbance and the set point at the previous sample time; b) Scaling the process input, process output, process measured disturbance to internal variables corresponding for process input, process output and process measured disturbances, respectively; c) When the controller is just enabled or a reset flag is raised then Reading the tuning parameters from the configuration file; d) Computing a state space form of the orthonormal Laguerre network: A, B, C(k), A_FFX, B_FFX, C_FFX(k), A_STS, B_STS, C_STS(k) where C(k), C_FFX(k), C_STS(k) are calculated from one of the following: loaded from a previously saved model; loaded from an initial model; initialised to [0,0,0, . . . 0] e) Computing control related matrices SB, SA, SS, K, SB_FFX, SA_FFX, SS_FFX, K_FFX, SB_STS, SA_STS, SS_STS, K_STS; f) Initialising C_M(k) with C(k), C_M_STS(k) with C_STS(k) and C_M_FFX(k) with C_FFX(k); g) Clearing the state vector L(k), L_FFX(k), L_STS(k) used during control; and h) Updating the models states as follows: $\begin{matrix} {{L(k)} = {{A*{L\left( {k - 1} \right)}} + {B*{{CV}\left( {k - 1} \right)}}}} \\ {{{L\_ FFX}(k)}\quad = {{{A\_ FFX}*{L\_ FFX}\left( {k - 1} \right)} + {{B\_ FFX}*{{FFX}\left( {k - 1} \right)}}}} \\ {{{L\_ STS}(k)} = {{{A\_ STS}*{L\_ STS}\left( {k - 1} \right)} + {{B\_ STS}*{{DV}\left( {k - 1} \right)}}}} \end{matrix}$

where A, A_FFX, A_STS represent the state and B, B_FFX, B_STS the input matrices of the corresponding state space representation of the Laguerre networks generated for the same pole but different number of filters, if required. i) Calculating the models output estimation: $\begin{matrix} {{{Y\_ EST}(k)} = {{{Y\_ EST}\left( {k - 1} \right)} + {{C(k)}*{L(k)}}}} \\ {{{Y\_ EST}{\_ FFX}(k)} = {{{Y\_ EST}{\_ FFX}\left( {k - 1} \right)} + {{C\_ FFX}(k)*{L\_ FFX}(k)}}} \\ {{{Y\_ EST}{\_ STS}(k)} = {{{Y\_ EST}{\_ STS}\left( {k - 1} \right)} + {{C\_ STS}(k)*{L\_ STS}(k)}}} \end{matrix}$

j) Updating the input of the unknown disturbance model: DV(k)=(Y _(—) EST(k)+Y _(—) EST _(—) FFX(k)+Y _(—) EST _(—) STS(k))−PV(k) k) Repeating steps h. to j. a plurality of times for the convergence of the state estimators. l) Iterate the computation of the input to the unknown disturbance model also for convergence purposes. m) Computation of the of the prediction parameter gain: BETA(k)=C(k)*SB(k)
 14. The method of claim 13 wherein the model states are updated as follows: $\begin{matrix} {{L(k)} = {{A*{L\left( {k - 1} \right)}} + {B*{{CV}\left( {k - 1} \right)}}}} \\ {{{L\_ FFX}(k)}\quad = {{{A\_ FFX}*{L\_ FFX}\left( {k - 1} \right)} + {{B\_ FFX}*{{FFX}\left( {k - 1} \right)}}}} \\ {{{L\_ STS}(k)} = {{{A\_ STS}*{L\_ STS}\left( {k - 1} \right)} + {{B\_ STS}*{{DV}\left( {k - 1} \right)}}}} \end{matrix}$

where A, A_FFX, A_STS represent the state and B, B_FFX, B_STS the input matrices of the corresponding state space representation of the Laguerre networks generated for the same pole but different number of filters if required.
 15. The method of claim 14 wherein the model output estimations are recalculated as follows: $\begin{matrix} {{{Y\_ EST}(k)} = {{{Y\_ EST}\left( {k - 1} \right)} + {{C(k)}*{L(k)}}}} \\ {{{Y\_ EST}{\_ FFX}(k)} = {{{Y\_ EST}{\_ FFX}\left( {k - 1} \right)} + {{C\_ FFX}(k)*{L\_ FFX}(k)}}} \\ {{{Y\_ EST}{\_ STS}(k)} = {{{Y\_ EST}{\_ STS}\left( {k - 1} \right)} + {{C\_ STS}(k)*{L\_ STS}{(k).}}}} \end{matrix}$


16. The method of claim 15 wherein the input of the unknown disturbance model is updated based on the following formula: DV(k)=(Y _(—) EST(k)+Y _(—) EST _(—) FFX(k)+Y _(—) EST _(—) STS(k))−PV(k)
 17. The method of claim 16 wherein BETA(k)=C(k)*SB(k).
 18. The method of claim 17 wherein the set point is filtered into a reference using the following digital filter: Y _(—) R(k)=(1−0.01*SP _(—) FILTER)*Y _(—) R(k−1)+0.01*SP _(—) FILTER*SET _(—) POINT(k).
 19. The method of claim 18 wherein CV(k) is calculated as: $\begin{matrix} {{{CV}(k)} = \quad {{{BETA}(k)}^{- 1}*\left( {{{Y\_ R}(k)} - {{PV}(k)} - \left( {{C(k)}*{SA}*{L(k)}} \right) -} \right.}} \\ {\quad \left( {{{C\_ STS}(k)*{SS}*{{DV}(k)}} + {{C\_ STS}(k)*{SA\_ STS}*}} \right.} \\ {{\quad \left. {{L\_ STS}(k)} \right)} - \left( {{{C\_ FFX}(k)*{SS}*{{DV}(k)}} + {{C\_ FFX}(k)*}} \right.} \\ {{\quad \left. {{SA\_ FFX}*{L\_ FFX}(k)} \right)}.} \end{matrix}$


20. The method of claim 19 wherein the following integrator is used $\begin{matrix} {{{INT\_ SUM}(k)} = \quad {{{INT\_ SUM}\left( {k - 1} \right)} + {{DIST\_ FILTER}{\_ PAR}*}}} \\ {\quad {{INT\_ GAIN}*\left( {{{Y\_ R}(k)} - {{PV}(k)}} \right)}} \\ {{{DIST\_ FILTER}{\_ PAR}} = \quad \left( \left( {{{DIST\_ FILTER}{\_ LENGTH}} -} \right. \right.} \\ {{\quad \left. {{SUM\_ CANCEL}{\_ COUNTER}} \right)}/} \\ {{\quad \left. {{DIST\_ FILTER}{\_ LENGTH}} \right)}^{5}\quad {and}\quad {{CV}(k)}} \\ {= \quad {{{CV}(k)} + {{INT\_ SUM}{(k).}}}} \end{matrix}$


21. The method of claim 20 wherein the scaling of controller internal variable CV(k) into controller output CV_PROCESS(k) involves a reverse computation: $\begin{matrix} {{{CV\_ PROCESS}(k)} = \quad \left( {{{{CV}(k)}/{LEARNING\_ RATE}}/} \right.} \\ {{\quad \left. {CV\_ NORMALIZATION} \right)}*} \\ {\quad {{{CV\_ RANGE}{\_ MAX}{\_ RAW}} -}} \\ {{\quad \left. {{CV\_ RANGE}{\_ MIN}{\_ RAW}} \right)} +} \\ {\quad {{CV\_ RANGE}{\_ MIN}{\_ RAW}}} \end{matrix}$

based on the following scaling factors: LEARNING_RATE CV_NORMALIZATION CV_RANGE_MAX_RAW CV_RANGE_MIN_RAW CV_RANGE_MIN_RAW
 22. The method of claim 21 wherein said scaling of the process input (CV_PROCESS(k)), process output (PV_PROCESS(k)), process measured disturbance (FFX_PROCESS(k)) to internal variables corresponding for process input (CV(k)), process output (PV(k)) and process measured disturbances (FFX(k)), respectively is done by the following sub-procedure: BWC_INTERNAL_GAIN = 0.06 Read the LEARNING_RATE Read the PLANT_GAIN DECISION_VARIABLE = PLANT_GAIN/BWC_INTERNAL_GAIN If DECISION_VARIABLE > 1 then CV_NORMALIZATION = PLANT_GAIN/BWC_INTERNAL_GAIN PV_NORMALIZATION = 1 Else PV_NORMALIZATION = PLANT_GAIN/BWC_INTERNAL_GAIN CV_NORMALIZATION = 1 Read CV_RANGE_MAX_RAW, CV_RANGE_MIN_RAW CV(k) = LEARNING_RATE*CV_NORMAL- IZATION*(CV_PROCESS(k)- CV_RANGE_MIN_RAW)/(CV_RANGE_MAX_RAW- CV_RANGE_MIN_RAW) PV(k) = LEARNING_RATE*PV_NORMAL- IZATION*(PV_PROCESS(k)- PV_RANGE_MIN_RAW)/(PV_RANGE_MAX_RAW- PV_RANGE_MIN_RAW) FFX(k) = LEARNING_RATE*FFX_NORMAL- IZATION*(FFX_PROCESS(k)- FFX_RANGE_MIN_RAW)/ (FFX_RANGE_MAX_RAW- FFX_RANGE_MIN_RAW) Procedure return


23. The method of claim 22 wherein when the controller is just enabled or reset flag is raised then the following tuning parameters are read from the configuration file: MIN_BETA 0.001 Minimum Beta - Used for model reloading SP_FILTER 100 SP Filtering in (Range 0-100, 100-No filtering) INT_GAIN 0.02 Sum Cancel parameter (default 1.0 for Int.Process) RLS_LAMBDA 0.99 RlsLambda - Recursive Least Square Parameter RLS_ALPHA 0.5 RlsAlpha - Recursive Least Square Parameter RLS_BETA 0.005 RlsBeta - Recursive Least Square Parameter RLS_DELTA 0.005 RlsDelta - Recursive Least Square Parameter PK_DIAG 10 Initial PK covariance matrix, with a diagonal structure INTEG_LEARN_FACTOR 1 Integrating Learning Factor (1-20) SLOPE_LIMIT 0.05 Steady State Slope Limit SUM_CANCEL_COUNTER 30 Number of updates after the set-point change has occurred DIST_FILTER_LENGTH 50 Number of samples used within the filter


24. The method of claim 13 comprising the further step of producing an accurate plant model based on Laguerre orthonormal basis functions identification, comprising the steps of: a) Checking for the pair of inputs for the plant model and known disturbance models as well as the output that characterize the plant equilibrium around a given set-point; b) employing a least square algorithm based on past and current data PV(k−15),PV(k−14), . . . ,PV(k) to estimate the slope (SLOPE(k)) of the process variable; c) based on this estimate while SLOPE(k) it is greater then SLOPE_LIMIT then the controller postponing the plant identification until this condition is met; d) CV_SS, FFX_SS being considered as the equilibrium inputs to the plant and known disturbance models, respectively, at the moment when learning was started; e) updating the state estimate for the plant and known disturbance models, respectively, as: $\begin{matrix} {{{L\_ M}(k)} = \quad {{A*{L\_ M}\left( {k - 1} \right)} + {B*\left( {{{CV}\left( {k - 1} \right)} - {CV\_ SS}} \right)}}} \\ {{{L\_ M}{\_ FFX}(k)} = \quad {{{A\_ FFX}*{L\_ M}{\_ FFX}\left( {k - 1} \right)} +}} \\ {\quad {{B\_ FFX}*\left( {{{FFX}\left( {k - 1} \right)} - {FFX\_ SS}} \right)}} \end{matrix}$

f) calculating the MODEL_ERROR as follows: $\begin{matrix} {{{PREDICTED\_ DELTA}{\_ PV}(k)} = \quad {{{C\_ M}\left( {k - 1} \right)*{L\_ M}(k)} +}} \\ {\quad {{{C\_ M}{\_ FFX}\left( {k - 1} \right)*{L\_ M}{\_ FFX}(k)} +}} \\ {\quad {{C\_ M}{\_ STS}\left( {k - 1} \right)*{L\_ M}{\_ STS}(k)}} \\ {{{ACTUAL\_ DELTA}{\_ PV}(k)} = \quad {{{PV}(k)} - {{PV}\left( {k - 1} \right)}}} \\ {{{MODEL\_ ERROR}(k)} = \quad {{{ACTUAL\_ DELTA}{\_ PV}(k)} -}} \\ {\quad {{PREDICTED\_ DELTA}{\_ PV}(k)}} \end{matrix}$

g) updating the covariance matrix update P(k) and P_FFX(k) for the plant and known disturbance models, respectively: $\begin{matrix} {{P(k)} = \quad {{{P\left( {k - 1} \right)}/{RLS\_ LAMBDA}} - \left( {{RLS\_ ALPHA}*{P\left( {k - 1} \right)}*} \right.}} \\ {\left. {{\quad \left. {{L\_ M}(k)} \right)}*{L\_ M}(k)^{T}*{P\left( {k - 1} \right)}} \right)/\left( {{RLS\_ LAMBDA}*} \right.} \\ {{\quad \left. \left( {{RLS\_ LAMBDA} + {{L\_ M}(k)^{T}*{P\left( {k - 1} \right)}*{L\_ M}(k)}} \right) \right)} +} \\ {\quad {{{RLS\_ BETA}*I} + {{RLS\_ DELTA}*{P\left( {k - 1} \right)}*{P\left( {k - 1} \right)}}}} \\ {{{P\_ FFX}(k)} = \quad {{{P\_ FFX}{\left( {k - 1} \right)/{RLS\_ LAMBDA}}} - \left( {{RLS\_ ALPHA}*} \right.}} \\ {{\quad \left. {{P\_ FFX}\left( {k - 1} \right)*{L\_ M}{\_ FFX}(k)} \right)}*{L\_ M}{\_ FFX}(k)^{T}*} \\ {{\quad \left. {{P\_ FFX}\left( {k - 1} \right)} \right)}/\left( {{RLS\_ LAMBDA}*\left( {{RLS\_ LAMBDA} +} \right.} \right.} \\ {{\quad \left. {{L\_ M}{\_ FFX}(k)^{T}*{P\_ FFX}\left( {k - 1} \right)*{L\_ M}{\_ FFX}(k)} \right)} +} \\ {\quad {{{RLS\_ BETA}*I} + {{RLS\_ DELTA}*{P\_ FFX}\left( {k - 1} \right)*}}} \\ {\quad {{P\_ FFX}\left( {k - 1} \right)}} \end{matrix}$

h) updating the output matrix for each corresponding model: $\begin{matrix} {{{C\_ M}(k)} = \quad {{{C\_ M}(k)} + \left( {R\quad L\quad {S\_ ALPHA}*{P(k)}*} \right.}} \\ {\quad {{L\_ M}{(k)/\left( {{RLS\_ LAMBDA} + {{\_ M}(k)^{T}*{P(k)}*}} \right.}}} \\ {\quad {\left. {L\_ M}(k) \right)*{MODEL\_ ERROR}}} \\ {{{C\_ M}{\_ FFX}(k)} = \quad {{{C\_ M}{\_ FFX}(k)} + \left( {{RLS\_ ALPHA}*{P\_ FFX}(k)*} \right.}} \\ {\quad {{L\_ M}{\_ FFX}(k)\text{/}\left( {{RLS\_ LAMBDA} +} \right.}} \\ {\quad {{L\_ M}{\_ FFX}(k)^{T}*{P\_ FFX}(k)*}} \\ {\quad {\left. {L\_ M}{\_ FFX}(k) \right)*{{MODEL\_ ERROR}.}}} \end{matrix}$


25. A computer program product comprising a computer usable medium having computer readable program code embodied in the medium for controlling a marginally stable industrial process by using a dynamic response model and compensating said dynamic response model by an estimate of an unmeasured disturbance, wherein said unmeasured disturbance is estimated as the difference between what the output of said industrial process predicted by said dynamic response model predicts and what the actually measured output of said industrial process.
 26. A data signal embodied in a carrier wave containing computer readable program code for controlling a marginally stable industrial process by using a dynamic response model and compensating said dynamic response model by an estimate of an unmeasured disturbance, wherein said unmeasured disturbance is estimated as the difference between what the output of said industrial process predicted by said dynamic response model predicts and what the actually measured output of said industrial process. 